package com.cyn.aframework.annotation;

import io.swagger.annotations.ApiOperation;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.lang.annotation.*;

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping
@ApiOperation("")
public @interface FusionOperation {
    @AliasFor("value")
    String name() default "";

    @AliasFor("name")
    String value() default "";

    @AliasFor(
        attribute = "path",
        annotation = RequestMapping.class
    )
    String[] mapping() default {};

    @AliasFor(
        attribute = "method",
        annotation = RequestMapping.class
    )
    RequestMethod[] method() default {RequestMethod.POST};

    @AliasFor(
        attribute = "value",
        annotation = ApiOperation.class
    )
    String desc() default "";

    @AliasFor(
        attribute = "notes",
        annotation = ApiOperation.class
    )
    String descNotes() default "";

    @AliasFor(
        attribute = "nickname",
        annotation = ApiOperation.class
    )
    String nickname() default "";

    String version() default "";
}